package com.qingcloud.adminbackend.pojo.cloud;

import com.anji.captcha.model.vo.CaptchaVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 云平台API请求参数
 */
public class CloudApiRequest {

    @Data
    public static class VerifySendParam extends CaptchaVO {

        @ApiModelProperty("类型 1-手机 2-邮箱")
        private Integer type;

        @ApiModelProperty("手机或邮箱")
        private String target;

    }

    @Data
    public static class CheckOrgParam implements Serializable {

        @ApiModelProperty("企业")
        @NotBlank(message = "企业不能为空")
        private String company;

    }

    @Data
    public static class RegisterParam implements Serializable {

        @ApiModelProperty("验证码")
        @NotBlank(message = "验证码不能为空")
        private String verifyCode;

        @ApiModelProperty("手机号")
        private String phone;

        @ApiModelProperty("邮箱")
        @NotBlank(message = "邮箱不能为空")
        private String email;

        @ApiModelProperty("密码")
        @NotBlank(message = "密码不能为空")
        private String password;

        @ApiModelProperty("企业")
        @NotBlank(message = "企业不能为空")
        private String company;

        @ApiModelProperty("企业ID，传了表示邀请注册")
        private String orgId;

        @ApiModelProperty("邀请成员分享key")
        private String shareKey;

        @ApiModelProperty(value = "邀请成员应用ID", hidden = true)
        private Integer appId;

        @ApiModelProperty(value = "邀请成员组ID", hidden = true)
        private String groupId;

        @ApiModelProperty(value = "邀请成员角色ID", hidden = true)
        private Integer roleId;

    }

    @Data
    public static class FindPwdParam implements Serializable {

        @ApiModelProperty("验证码")
        @NotBlank(message = "验证码不能为空")
        private String verifyCode;

        @ApiModelProperty("邮箱")
        @NotBlank(message = "邮箱不能为空")
        private String email;

        @ApiModelProperty("密码")
        @NotBlank(message = "密码不能为空")
        private String password;

    }

    @ApiModel("轻云修改用户信息参数")
    @Data
    public static class ModifyParam implements Serializable {

        @ApiModelProperty("用户ID")
        @NotBlank(message = "用户ID不能为空")
        private String userId;

        @ApiModelProperty("手机号")
        private String phone;

        @ApiModelProperty("昵称")
        @NotBlank(message = "昵称不能为空")
        private String fullName;

    }

}
